{% extends '::base.html.twig' %}

{% block layout %}
<!-- Top line begins -->
<div id="top">
    <div class="wrapper">
        <a href="{{ path('project_scrum_profil') }}" title="" class="logo"><img src="{{ asset('bundles/projectscrum/images/logo.png')}}" alt="" /></a>

        {% if app.session.get('role') != "" %}
        <!-- Right top nav -->
        <div class="topNav">
            <ul class="userNav">
                <li><a href="{{ path('project_scrum_profil') }}" title="" class="profile"></a></li>
                <li><a href="{{ path('project_scrum_message') }}" title="" class="messages"></a></li>
                <li><a href="{{ path('project_authentification_deconnexion') }}" title="" class="logout"></a></li>
                <li class="showTabletP"><a href="#" title="" class="sidebar"></a></li>
            </ul>
            <a title="" class="iButton"></a>
            <a title="" class="iTop"></a>
        </div>
        {% endif %}
        <div class="clear"></div>
    </div>
</div>
<!-- Top line ends -->

{% block sidebar %}
<!-- Sidebar begins -->
<div id="sidebar">
    <div class="mainNav">
        <div class="user">
            <a title="" class="leftUserDrop"><img src="{{ asset('bundles/projectscrum/images/user.png')}}" alt="" /><span><strong>3</strong></span></a><span>{{ app.session.get('nom') }}</span>
            <ul class="leftUser">
                <li><a href="{{ path('project_scrum_profil') }}" title="" class="sProfile">My profile</a></li>
                <li><a href="{{ path('project_scrum_message') }}" title="" class="sMessages">Messages</a></li>
                <li><a href="{{ path('project_scrum_cra') }}" title="" class="sSettings">CRA</a></li>
                <li><a href="{{ path('project_authentification_deconnexion') }}" title="" class="sLogout">Logout</a></li>
            </ul>
        </div>

        <!-- Main nav -->
        {% set nomRoute = app.request.attributes.get('_route') %}
        
        {# Admin Menu#}
        {% if app.session.get('role') == "ROLE_ADMIN" %}
        <ul class="nav">
            <li><a {%if nomRoute == 'project_admin_createuser'%}class="active" {% endif %} href="{{ path('project_admin_createuser') }}" title=""><img src="{{ asset('bundles/projectscrum/images/icons/mainnav/ui.png')}}" alt="" /><span>Créer Utilisateurs</span></a>
            </li>
            <li><a {%if nomRoute == 'project_admin_createproject'%}class="active" {% endif %} href="{{ path('project_admin_createproject') }}" title=""><img src="{{ asset('bundles/projectscrum/images/icons/mainnav/forms.png')}}" alt="" /><span>Créer Projets</span></a>
            </li>
            <li><a {%if nomRoute == 'project_scrum_message'%}class="active" {% endif %} href="{{ path('project_scrum_message') }}" title=""><img src="{{ asset('bundles/projectscrum/images/icons/mainnav/messages.png')}}" alt="" /><span>Messages</span></a></li>
        </ul>
        {# Dev Menu#}
        {% elseif app.session.get('role') == "ROLE_DEV" %}
        <ul class="nav">
            <li><a {%if nomRoute == 'project_scrum_tableaudebord'%}class="active" {% endif %} href="{{ path('project_scrum_tableaudebord') }}" title=""><img src="{{ asset('bundles/projectscrum/images/icons/mainnav/dashboard.png')}}" alt="" /><span>Tableau de Bord</span></a></li>
            <li><a {%if nomRoute == 'project_scrum_message'%}class="active" {% endif %} href="{{ path('project_scrum_message') }}" title=""><img src="{{ asset('bundles/projectscrum/images/icons/mainnav/messages.png')}}" alt="" /><span>Messages</span></a></li>
            <li><a {%if nomRoute == 'project_planning_poker_index'%}class="active" {% endif %} href="{{ path('project_planning_poker_index') }}" title=""><img src="{{ asset('bundles/projectscrum/images/icons/mainnav/pique.png')}}" alt="" /><span>Planning Poker</span></a>
            </li> 
        </ul>
        {# Scrum master Menu#}
        {% elseif app.session.get('role') == "ROLE_SCRUMMASTER" %}
        <ul class="nav">
            <li><a {%if nomRoute == 'project_scrum_tableaudebord'%}class="active" {% endif %} href="{{ path('project_scrum_tableaudebord') }}" title=""><img src="{{ asset('bundles/projectscrum/images/icons/mainnav/dashboard.png')}}" alt="" /><span>Tableau de Bord</span></a></li>
            <li><a {%if nomRoute == 'project_scrum_message'%}class="active" {% endif %} href="{{ path('project_scrum_message') }}" title=""><img src="{{ asset('bundles/projectscrum/images/icons/mainnav/messages.png')}}" alt="" /><span>Messages</span></a></li>
            <li><a {%if nomRoute == 'project_scrum_creategroup'%}class="active" {% endif %} href="{{ path('project_scrum_creategroup') }}" title=""><img src="{{ asset('bundles/projectscrum/images/icons/mainnav/forms.png')}}" alt="" /><span>Projet</span></a>
            </li>
            <li><a {%if nomRoute == 'project_scrum_stats'%}class="active" {% endif %} href="{{ path('project_scrum_stats') }}" title=""><img src="{{ asset('bundles/projectscrum/images/icons/mainnav/statistics.png')}}" alt="" /><span>Statistiques</span></a></li>
            <li><a {%if nomRoute == 'project_planning_poker_index'%}class="active" {% endif %} href="{{ path('project_planning_poker_index') }}" title=""><img src="{{ asset('bundles/projectscrum/images/icons/mainnav/pique.png')}}" alt="" /><span>Planning Poker</span></a>
            </li>
        </ul>
        {# Client Menu#}
        {% elseif app.session.get('role') == "ROLE_CLIENT" %}
        <ul class="nav">
            <li><a {%if nomRoute == 'project_scrum_tableaudebord'%}class="active" {% endif %} href="{{ path('project_scrum_tableaudebord') }}" title=""><img src="{{ asset('bundles/projectscrum/images/icons/mainnav/dashboard.png')}}" alt="" /><span>Tableau de Bord</span></a></li>
            <li><a {%if nomRoute == 'project_scrum_message'%}class="active" {% endif %} href="{{ path('project_scrum_message') }}" title=""><img src="{{ asset('bundles/projectscrum/images/icons/mainnav/messages.png')}}" alt="" /><span>Messages</span></a></li>
            <li><a {%if nomRoute == 'project_scrum_userstories'%}class="active" {% endif %} href="{{ path('project_scrum_userstories') }}" title=""><img src="{{ asset('bundles/projectscrum/images/icons/mainnav/tables.png')}}" alt="" /><span>User Stories</span></a>
            </li>

        </ul>
        {% endif %}
    </div>
{% endblock %}

{% block authentification %}
    <!-- Secondary nav -->
    <div class="secNav">
        <div class="secWrapper">
            <div class="secTop">
                <div class="balance">
                    <div class="balInfo">{% block titreNav %}{% endblock %}</div>
                </div>
            </div>
            <div class="divider"><span></span></div>
            {% block contentnav %}{% endblock %}
            <div class="divider"><span></span></div>
        </div> 
        <div class="clear"></div>
    </div>
</div>
<!-- Sidebar ends -->


<!-- Content begins -->
<div id="content">
    <div class="contentTop">
        <span class="pageTitle"><span class="icon-screen"></span>{% block titreContent %}{% endblock %}</span>
        <div class="clear"></div>
    </div>

    <!-- Breadcrumbs line -->
    <div class="breadLine">
        <div class="bc">
            <ul id="breadcrumbs" class="breadcrumbs">
                {% block titreBreadcrumbs %}{% endblock %}
                </ul>
            </div>
        </div>

        <!-- Main content -->
        <div class="wrapper">
            <div class="fluid">
            {% block content %}{% endblock %}
                    <div class="clear"></div>
                </div>   

            </div>
            <!-- Main content ends -->

        </div>
        <!-- Content ends -->
{% endblock %}

{% endblock %}
